package com.sky.service.impl;

import com.sky.entity.Setmeal;
import com.sky.mapper.SetmealMapper;
import com.sky.service.SetmealService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SetmealServiceImpl implements SetmealService {

    @Autowired
    private SetmealMapper setmealMapper;

    @Override
    public List<Setmeal> selectByCategoryId(Setmeal setmeal) {
        List<Setmeal> setmeals = setmealMapper.getByCategoryId(setmeal);
        return setmeals;
    }

    @Override
    public List<Setmeal> getById(Long id) {
        Long setmealId = id;
        List<Setmeal> list = setmealMapper.getById(setmealId);
        return list;
    }
}
